<template>
    <div class="common_page">
        <div class="main_content" ref="mainContent">
            <div class="main_content_top">
                <div v-for="(item, index) in topData" :key="index" class="main_content_top_box">
                    <div class="top_box_head">{{ item.name }}</div>
                    <div class="top_box_content"
                        :class="item.id == 6 ? 'top_box_red' : item.id == 7 ? 'top_box_green' : ''">
                        <el-image v-if="item.img" style="width: 31px; height: 30px" :src="item.img"
                            fit="fill"></el-image>
                        <div class="top_box_content_num">{{ item.num }}</div>
                        <div class="top_box_content_unit">{{ item.unit }}</div>
                    </div>
                </div>
            </div>
            <el-card class="main-card" shadow="never">
                <el-form :model="searchData" ref="queryForm" :inline="true" label-width="68px"
                    style="margin-bottom: -20px">
                    <el-form-item label="批次编号" prop="number">
                        <el-input placeholder="请输入内容" v-model="searchData.number"></el-input>
                    </el-form-item>
                    <el-form-item label="批次名称" prop="name">
                        <el-input placeholder="请输入内容" v-model="searchData.name"></el-input>
                    </el-form-item>
                    <el-form-item label="订单编号" prop="orderNumber">
                        <el-input placeholder="请输入内容" v-model="searchData.orderNumber"></el-input>
                    </el-form-item>
                    <el-form-item label="厂区" prop="plantId">
                        <el-select clearable v-model="searchData.plantId" placeholder="请选择" @change="plantChange">
                            <el-option v-for="item in plantList" :key="item.id" :label="item.plantName"
                                :value="item.id" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="区域" prop="workshopId">
                        <el-select v-model="searchData.workshopId" clearable placeholder="请选择">
                            <el-option v-for="item in workshopList" :key="item.id" :label="item.shopName"
                                :value="item.id" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="状态" prop="type">
                        <el-select v-model="searchData.type" clearable placeholder="请选择">
                            <el-option v-for="item in stateList" :key="item.id" :label="item.name" :value="item.id" />
                        </el-select>
                    </el-form-item>
                    <el-form-item label="" prop="templateNumber">
                        <el-button v-hasPermi="['productManage/bitchManage:query']" type="primary" icon="el-icon-search"
                            size="mini" @click="search">{{ $t('search') }}</el-button>
                    </el-form-item>
                </el-form>
                <div class="card-toolbar mb8 flex-between" style="margin-top: 20px; width: 100%">
                    <el-button v-hasPermi="['productManage/bitchManage:add']" type="primary" icon="el-icon-plus"
                        size="mini" @click="addNew">{{ $t('add') }}</el-button>
                    <div>
                        <el-tooltip class="item" effect="dark" content="重置" placement="top">
                            <el-button size="mini" circle icon="el-icon-refresh"
                                v-hasPermi="['productManage/bitchManage:query']" @click="resetFields" />
                        </el-tooltip>
                    </div>
                </div>

                <div class="page_content" style="width: 100%">
                    <div class="page_content_bottom">
                        <sysTable :data="setTableData" :columns="setTableColumns" :curr-page="searchData.currPage"
                            :total-page="pageTotal" :page-size="searchData.pageSize" @sizeChange="sizeChange"
                            @currentChange="currentChange">
                            <template #type="scope">
                                <div :class="jumpClass(scope.scope.row.type)">{{ jumpState(scope.scope.row.type) }}
                                </div>
                            </template>
                            <template #operation="scope">
                                <el-button v-hasPermi="['productManage/bitchManage:edit']" size="small" type="primary"
                                    plain style="padding: 5px" icon="el-icon-edit"
                                    @click="editDialog(scope.scope.row)">编辑</el-button>
                                <el-button v-hasPermi="['productManage/bitchManage:detail']" size="small" type="primary"
                                    plain style="padding: 5px" icon="el-icon-view"
                                    @click="detailDialog(scope.scope.row)">
                                    详情
                                </el-button>
                                <el-button v-hasPermi="['productManage/bitchManage:remove']" size="small" type="danger"
                                    plain style="padding: 5px" icon="el-icon-delete"
                                    @click="delOne(scope.scope.row)">删除</el-button>
                            </template>
                        </sysTable>
                    </div>
                </div>
            </el-card>
            <el-dialog :title="addOrEditTitle" :visible.sync="addOrEditDialog" width="1140px" append-to-body>
                <el-form ref="form" :model="formData" label-width="100px">
                    <el-row>
                        <el-col :span="24">
                            <el-form-item label="关联订单编号:" prop="orderNumber">
                                <el-input v-model="formData.orderNumber" :disabled="addOrEditTitle == '详情'"
                                    placeholder="请输入内容" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="批次编号:" prop="number">
                                <el-input v-model="formData.number" :disabled="addOrEditTitle == '详情'"
                                    placeholder="请输入内容" style="width: 220px" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="批次名称:" prop="name">
                                <el-input v-model="formData.name" :disabled="addOrEditTitle == '详情'" placeholder="请输入内容"
                                    style="width: 220px" />
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="厂区:" prop="plantId">
                                <el-select v-model="formData.plantId" clearable :disabled="addOrEditTitle == '详情'"
                                    placeholder="请选择" @change="plantChange">
                                    <el-option v-for="item in plantList" :key="item.id" :label="item.plantName"
                                        :value="item.id" />
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="12">
                            <el-form-item label="所在区域:" prop="workshopId">
                                <el-select v-model="formData.workshopId" clearable :disabled="addOrEditTitle == '详情'"
                                    placeholder="请选择">
                                    <el-option v-for="item in workshopList" :key="item.id" :label="item.shopName"
                                        :value="item.id" />
                                </el-select>
                            </el-form-item>
                        </el-col>
                    </el-row>
                    <el-row v-if="addOrEditTitle == '编辑'">
                        <el-col :span="24">
                            <el-form-item label="批次状态:" prop="type">
                                <el-radio-group v-model="formData.type">
                                    <el-radio :label="1">待处理</el-radio>
                                    <el-radio :label="2">生产中</el-radio>
                                    <el-radio :label="3">已完成</el-radio>
                                </el-radio-group>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-form>
                <div class="form_line"></div>
                <div class="form_segment" v-for="(item, index) in formData.batchSegmentationList" :key="index">
                    <el-image style="width: 20px; height: 20px; cursor: pointer" :src="bitchDel"
                        @click="delSegment(index)" fit="fill"></el-image>
                    <div class="form_segment_data">
                        <el-form ref="form" :model="formData" label-width="100px">
                            <el-row>
                                <el-col :span="12">
                                    <el-form-item label="分段:" prop="orderNumber">
                                        <el-input v-model="item.segmentName" style="width: 220px"
                                            :disabled="addOrEditTitle == '详情'" placeholder="请输入内容" />
                                    </el-form-item>
                                </el-col>
                                <el-col :span="12">
                                    <el-form-item label="选择区域:" prop="number">
                                        <el-select v-model="item.workshopId" clearable
                                            :disabled="addOrEditTitle == '详情'" style="width: 220px" placeholder="请选择">
                                            <el-option v-for="item in workshopList" :key="item.id"
                                                :label="item.shopName" :value="item.id" />
                                        </el-select>
                                    </el-form-item>
                                </el-col>
                            </el-row>
                        </el-form>
                    </div>
                </div>
                <div v-if="addOrEditTitle !== '详情'" class="form_add" @click="addSegment">
                    <el-image style="width: 20px; height: 20px" :src="bitchAdd" fit="fill"></el-image>
                    <div class="form_add_tips">继续添加</div>
                </div>
                <!-- <div class="add_dialog_bottomTitle">生产分段</div>
          <div class="add_dialog_bottom" v-for="(item, index) in productBatchList" :key="index" :class="item.showMore? '' : 'add_dialog_bottom_top_expansion'">
            <div class="add_dialog_bottom_top" >
              <div>生产批次-{{ index + 1 }}</div>
              <div class="add_dialog_bottom_operation" v-if="productBatchList.length> 1">
                <el-image style="width:20px;height: 20px;margin-left: 10px;cursor: pointer;" :src="require('@/assets/images/orderDel.png')"></el-image>
              </div>
            </div>
            <div class="add_dialog_bottom_bottom">
              <el-form ref="form" :model="formData" label-width="100px">
                  <el-row>
                    <el-col :span="12">
                      <el-form-item label="批次编号:" prop="unit">
                        <el-input v-model="formData.unit" size="small" placeholder="请输入内容" style="width:220px;" />
                      </el-form-item>
                    </el-col>
                    <el-col :span="12">
                      <el-form-item label="批次名称:" prop="countPrice">
                        <el-input v-model="formData.countPrice" size="small" placeholder="请输入内容" style="width:220px;" />
                      </el-form-item>
                    </el-col>
                  </el-row>
              </el-form>
            </div>
          </div>
          <div class="add_dialog_addBtn">
            <el-image style="width:20px;height: 20px;margin: 0 10px 0 16px;" :src="require('@/assets/images/addOrder.png')"></el-image>
            <div>继续添加生产分段</div>
          </div> -->
                <div slot="footer" class="dialog-footer">
                    <el-button @click="cancel">取 消</el-button>
                    <el-button type="primary" @click="submitForm">提 交</el-button>
                </div>
            </el-dialog>
        </div>
    </div>
</template>

<script>
import { getBarchList, addBarch, updateBarch, deleteBarch, getBarchDetail, getBarchTop, getWorkshopList, getFactoryAreaList } from '../api/product/index';
import sysTable from '../components/SysTable';
export default {
    name: 'equipmentEnergy',
    components: {
        sysTable,
    },
    data() {
        return {
            searchData: {
                number: '',
                name: '',
                orderNumber: '',
                plantId: '',
                workshopId: '',
                type: '',
                pageSize: 10,
                currPage: 1,
            },
            setTableData: [],
            stateList: [
                {
                    id: 1,
                    name: '待处理',
                },
                {
                    id: 2,
                    name: '生产中',
                },
                {
                    id: 3,
                    name: '已完成',
                },
            ],
            workshopList: [],
            plantList: [],
            pageTotal: 0,
            setTableColumns: [
                {
                    label: '批次编号',
                    prop: 'number',
                    minWidth: '180',
                    align: 'center',
                    fixed: 'left',
                    showOverflowTooltip: true,
                },
                {
                    label: '批次名称',
                    prop: 'name',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },
                {
                    label: '订单编号',
                    prop: 'orderNumber',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },
                {
                    label: '预计开始时间',
                    prop: 'beginDate',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },
                {
                    label: '预计结束时间',
                    prop: 'endDate',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },
                {
                    label: '预计用时',
                    prop: 'timeConsuming',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },
                {
                    label: '实际结束',
                    prop: 'factEndDate',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },
                {
                    label: '实际用时',
                    prop: 'timeFact',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },
                {
                    label: '厂区',
                    prop: 'plantName',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },
                // {
                //   label: '有功电量(kW·h)',
                //   prop: 'activePower',
                //   width: '180',
                //   align: 'center',
                //   showOverflowTooltip: true
                // },
                // {
                //   label: '无功电量(Kvar)',
                //   prop: 'reactivePower',
                //   width: '180',
                //   align: 'center',
                //   showOverflowTooltip: true
                // },
                {
                    label: '所在区域',
                    prop: 'workshopName',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },

                {
                    label: '状态',
                    prop: 'type',
                    width: '180',
                    align: 'center',
                    showOverflowTooltip: true,
                },
                {
                    label: '操作',
                    prop: 'operation',
                    minWidth: '220',
                    fixed: 'right',
                    align: 'center',
                },
            ],
            topData: [
                {
                    name: '已完成总批次',
                    id: 1,
                    unit: '个',
                    num: '2240',
                    img: '',
                },
                {
                    name: '待处理批次',
                    id: 2,
                    unit: '个',
                    num: '8',
                    img: '',
                },
                {
                    name: '处理中批次',
                    id: 3,
                    unit: '个',
                    num: '4',
                    img: '',
                },
                {
                    name: '批次完成率',
                    id: 4,
                    unit: '%',
                    num: '98',
                    img: '',
                },
                {
                    name: '每批次平均用时',
                    id: 5,
                    unit: '小时',
                    num: '5.6',
                    img: '',
                },
                {
                    name: '上月同比',
                    id: 6,
                    unit: '%',
                    num: '124',
                    img: require('../images/upward.png'),
                },
                {
                    name: '上月环比',
                    id: 7,
                    unit: '%',
                    num: '24',
                    img: require('../images/down.png'),
                },
            ],
            buttonLoading: false,
            addOrEditTitle: '新增',
            formData: {
                orderNumber: '',
                number: '',
                name: '',
                plantId: '',
                workshopId: '',
                type: 1,
                batchSegmentationList: [
                    {
                        segmentName: '',
                        workshopId: '',
                    },
                ],
            },
            bitchAdd: require('../images/bitchAdd.png'),
            bitchDel: require('../images/bitchDel.png'),
            addOrEditDialog: false,
            productBatchList: [
                {
                    showMore: false,
                },
            ],
        };
    },
    mounted() {
        this.getPageList();
        this.getTopData();
        this.getPlantList();
    },
    methods: {
        search() {
            this.buttonLoading = true;
            this.getPageList();
        },
        resetFields() {
            this.workShopList = [];
            this.deviceList = [];
            this.searchData = {
                number: '',
                name: '',
                orderNumber: '',
                plantId: '',
                workshopId: '',
                type: '',
                pageSize: 10,
                currPage: 1,
            };
            this.search();
        },
        sizeChange(val) {
            this.searchData.pageSize = val;
            this.getPageList();
        },
        currentChange(val) {
            this.searchData.currPage = val;
            this.getPageList();
        },
        getPageList() {
            getBarchList(this.searchData)
                .then((res) => {
                    if (res.code == 200) {
                        this.setTableData = res.data.list || [];
                        this.pageTotal = res.data.total || 0;
                    } else {
                        this.setTableData = [];
                        this.pageTotal = 0;
                        this.$message.error('列表数据请求失败，请联系管理员');
                    }
                    this.buttonLoading = false;
                })
                .finally(() => {
                    this.buttonLoading = false;
                });
        },
        getTopData() {
            getBarchTop().then((res) => {
                console.log(res, '头部数据');
                if (res.code == 200) {
                    this.topData[0].num = res.data.finished;
                    this.topData[1].num = res.data.pending;
                    this.topData[2].num = res.data.processed;
                    this.topData[3].num = res.data.finishingRate;
                    this.topData[4].num = res.data.averageTime;
                    this.topData[5].num = res.data.onYearOnYearBasis;
                    this.topData[6].num = res.data.linkRelativeRatio;
                } else {
                    this.$message.error('头部数据请求失败，请联系管理员');
                }
            });
        },
        getPlantList() {
            getFactoryAreaList().then((res) => {
                console.log(res, '厂区列表');
                if (res.code == 200) {
                    this.plantList = res.data || [];
                } else {
                    this.$message.error('厂区数据请求失败，请联系管理员');
                }
            });
        },
        getWorkshopList(val) {
            getWorkshopList(val).then((res) => {
                console.log('区域列表');
                if (res.code == 200) {
                    this.workshopList = res.data || [];
                } else {
                    this.$message.error('区域数据请求失败，请联系管理员');
                }
            });
        },
        plantChange(val) {
            this.workshopList = [];
            this.searchData.workshopId = '';
            if (val) {
                this.getWorkshopList(val);
            }
        },
        delOne(val) {
            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
            })
                .then(() => {
                    const obj = {
                        id: val.id,
                    };
                    deleteBarch(obj).then((res) => {
                        if (res.code == 200) {
                            this.$message({
                                type: 'success',
                                message: '删除成功!',
                            });
                            this.getPageList();
                        } else {
                            this.$message({
                                type: 'error',
                                message: res.msg,
                            });
                        }
                    });
                })
                .catch(() => {
                    this.$message({
                        type: 'info',
                        message: '已取消删除',
                    });
                });
        },
        addNew() {
            this.addOrEditTitle = '新增';
            this.addOrEditDialog = true;
        },
        editDialog(val) {
            getBarchDetail({ id: val.id }).then((res) => {
                this.formData = res.data;
                this.getWorkshopList(this.formData.plantId);
                this.addOrEditTitle = '编辑';
                this.addOrEditDialog = true;
            });
        },
        detailDialog(val) {
            getBarchDetail({ id: val.id }).then((res) => {
                this.formData = res.data;
                this.getWorkshopList(this.formData.plantId);
                this.addOrEditTitle = '详情';
                this.addOrEditDialog = true;
            });
        },
        submitForm() {
            if (this.addOrEditTitle == '新增') {
                addBarch(this.formData).then((res) => {
                    if ((res.code = 200)) {
                        this.cancel();
                        this.searchData.currPage = 1;
                        this.getPageList();
                    } else {
                        this.$message.error('新增失败，请联系管理员');
                    }
                });
            } else {
                updateBarch(this.formData).then((res) => {
                    if ((res.code = 200)) {
                        this.cancel();
                        this.searchData.currPage = 1;
                        this.getPageList();
                    } else {
                        this.$message.error('新增失败，请联系管理员');
                    }
                });
            }
        },
        cancel() {
            this.addOrEditDialog = false;
            this.formData = {
                orderNumber: '',
                number: '',
                name: '',
                plantId: '',
                workshopId: '',
                type: 1,
                batchSegmentationList: [
                    {
                        segmentName: '',
                        workshopId: '',
                    },
                ],
            };
        },

        delSegment(val) {
            if (this.addOrEditTitle == '详情') {
                return;
            }
            if (this.formData.batchSegmentationList.length > 1) {
                this.formData.batchSegmentationList.splice(val, 1);
            } else {
                this.$message('最少要有一条分段');
            }
        },
        addSegment() {
            this.formData.batchSegmentationList.push({
                segmentName: '',
                workshopId: '',
            });
        },
        jumpState(val) {
            switch (val) {
                case 1:
                    return '待处理';
                case 2:
                    return '生产中';
                case 3:
                    return '已完成';
                default:
                    return '-';
            }
        },
        jumpClass(val) {
            switch (val) {
                case 1:
                    return 'waits';
                case 2:
                    return 'processs';
                case 3:
                    return 'completes';
                default:
                    return '-';
            }
        },
    },
};
</script>

<style lang="scss" scoped>
.common_page {
    height: 100%;
    width: 100%;
    background: #f3f4f5;
    overflow: auto;
}

.main_content {
    padding: 16px 20px;
}

::v-deep.el-card {
    border-radius: 8px;
}

.page_content {
    background: #fff;
    padding-bottom: 30px;
    box-sizing: border-box;
    padding: 20px 20px 30px 20px;
    border-radius: 8px;

    .page_content_head {
        display: flex;
    }
}

.main_content_top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;

    .main_content_top_box {
        width: 13.5%;
        // margin-right: 1.5%;
        height: 104px;
        background: #fff;
        box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.02), 0px 10px 20px 0px rgba(0, 0, 0, 0.05);
        border-radius: 8px 8px 8px 8px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        .top_box_head {
            color: #666;
            font-size: 14px;
            line-height: 20px;
            margin-bottom: 4px;
        }

        .top_box_content {
            color: #333;
            font-size: 14px;
            // line-height: 30px;
            display: flex;
            align-items: flex-end;
            justify-content: center;

            .top_box_content_num {
                font-size: 26px;
                font-weight: bold;
                line-height: 30px;
            }

            .top_box_content_unit {
                line-height: 22px;
            }
        }

        .top_box_red {
            color: #ff4c4d;
        }

        .top_box_green {
            color: #00b24a;
        }
    }

    // .main_content_top_box:last-of-type {
    //   margin-right: 0px;
    // }
}

::v-deep.sys_table {
    .tableHeaderRow {
        cursor: pointer;

        .tableHeaderCell:active {
            opacity: 0.6;
        }

        .tableHeaderCell:last-of-type:active {
            opacity: 1;
        }

        .tableHeaderCell:first-of-type:active {
            opacity: 1;
        }

        .tableHeaderCell:last-of-type {
            cursor: default;
        }

        .tableHeaderCell:first-of-type {
            cursor: default;
        }
    }
}

::v-deep.el-form {
    .el-form-item {
        .el-form-item__label {
            // text-align: left;
            color: #666;
            font-size: 14px;
            font-weight: 400;
        }
    }
}

::v-deep .el-dialog {
    .el-dialog__body {
        padding: 24px;
    }
}

.add_dialog_top {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    padding: 16px;
}

.add_dialog_bottomTitle {
    color: #4a4a4a;
    font-size: 16px;
    line-height: 24px;
    margin: 20px 0;
    font-weight: 500;
}

.add_dialog_addBtn {
    height: 52px;
    background: rgba(51, 153, 255, 0.1);
    border-radius: 0px 0px 0px 0px;
    opacity: 1;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 20px;
}

.add_dialog_bottom {
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f7f8f9;
    margin-bottom: 10px;
    height: 52px;
    box-sizing: border-box;
    overflow: hidden;

    .add_dialog_bottom_top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }
}

.add_dialog_bottom_top_expansion {
    height: unset;
    box-sizing: border-box;
    overflow: visible;

    .add_dialog_bottom_top {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding-bottom: 12px;
    }
}

.add_dialog_bottom_bottom {
    ::v-deep.el-form {
        .el-form-item {
            margin-bottom: 0px;
        }

        // .el-form-item:nth-of-type(4) {
        //   margin-bottom: 0px;
        // }
        // .el-form-item:nth-of-type(5) {
        //   margin-bottom: 0px;
        // }
        // .el-form-item:nth-of-type(6) {
        //   margin-bottom: 0px;
        // }
    }
}

.ope_btn {
    width: 44px;
    height: 28px;
    line-height: 28px;
    color: #3399ff;
    font-size: 14px;
    background: #ffffff;
    border-radius: 4px 4px 4px 4px;
    border: 1px solid rgba(0, 85, 255, 0.5);
    padding: 0px;
}

.del_btn {
    width: 44px;
    height: 28px;
    background: #ffffff;
    line-height: 28px;
    color: #ff4c4d;
    font-size: 14px;
    border-radius: 4px 4px 4px 4px;
    opacity: 1;
    border: 1px solid rgba(255, 76, 77, 0.5);
    padding: 0px;
}

.processs {
    width: 58px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: rgba(255, 119, 51, 0.1);
    border-radius: 4px 4px 4px 4px;
    color: #ff7733;
    font-size: 14px;
    margin: 0 auto;
}

.waits {
    width: 58px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: rgba(51, 153, 255, 0.1);
    border-radius: 4px 4px 4px 4px;
    color: #3399ff;
    font-size: 14px;
    margin: 0 auto;
}

.completes {
    width: 58px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: rgba(0, 178, 74, 0.1);
    border-radius: 4px 4px 4px 4px;
    color: #00b24a;
    font-size: 14px;
    margin: 0 auto;
}

.form_line {
    height: 1px;
    width: 100%;
    background: rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.form_segment {
    display: flex;
    align-items: center;
    margin-bottom: 20px;

    .form_segment_data {
        width: 100%;
        margin-left: 20px;

        ::v-deep.el-form {
            .el-form-item {
                margin-bottom: 0px;
                // .el-form-item__label {
                //   text-align: left;
                //   color: #666;
                //   font-size: 14px;
                //   font-weight: 400;
                // }
            }
        }
    }
}

.form_add {
    display: flex;
    align-items: center;
    cursor: pointer;

    .form_add_tips {
        font-weight: 500;
        color: #3399ff;
        line-height: 20px;
        font-size: 14px;
        margin-left: 20px;
    }
}
</style>
